package com.xyh.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @Author:kyle
 * @Date:2020/12/14 - 13:00
 * @Project:spring_demo1
 * @Package:com.xyh.config
 * @Version:1.0
 */
@Data
@Component("dbProperties")
@PropertySource("classpath:jdbc.properties")
public class DBProperties {

    @Value("${driverClassName}")
    private String driverClassName;
    @Value("${url}")
    private String url;
    @Value("${user}")
    private String user;
    @Value("${password}")
    private String password;
}
